package com.customization.proxy.impl;


import com.api.formmode.page.util.Util;
import com.weaverboot.frame.ioc.anno.classAnno.WeaIocReplaceComponent;
import com.weaverboot.frame.ioc.anno.methodAnno.WeaReplaceAfter;
import com.weaverboot.frame.ioc.handler.replace.weaReplaceParam.impl.WeaAfterReplaceParam;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import weaver.conn.RecordSet;

import java.util.Map;

@WeaIocReplaceComponent("HrmResourceAddService")
public class ProxyHrmResourceAddService {

    @WeaReplaceAfter(value = "/api/hrm/resource/add/getHrmResourceAddForm",order = 1)
    public String afterExceute(WeaAfterReplaceParam weaAfterReplaceParam) {

        String data = weaAfterReplaceParam.getData();//这个就是接口执行完的报文
        JSONObject obj = JSONObject.fromObject(data);
        obj.put("customDesc", "ProxyHrmResourceAddService 20220322 lth");
        JSONArray his=obj.getJSONArray("condition").getJSONObject(0).getJSONArray("items");
        JSONArray newArr=new JSONArray();
        for (int i = 0; i <his.size() ; i++) {
            if(i==1){
                JSONObject certnum=JSONObject.fromObject("{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"cus_certnum\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"身份证号码\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"otherParams\":{\"inputType\":\"multilang\",\"isBase64\":true},\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":3}");
                newArr.add(certnum);
            }
            newArr.add(his.getJSONObject(i));
        }
        obj.getJSONArray("condition").getJSONObject(0).put("items",newArr);

        return obj.toString();
    }
    @WeaReplaceAfter(value = "/api/hrm/resource/add/save",order = 1)
    public String afterSaveExceute(WeaAfterReplaceParam weaAfterReplaceParam) {
        String data = weaAfterReplaceParam.getData();//这个就是接口执行完的报文
        JSONObject obj = JSONObject.fromObject(data);
        obj.put("customDesc", "ProxyHrmResourceAddService 20220322 lth");
        Map param=weaAfterReplaceParam.getParamMap();
        String departmentid=Util.null2String(param.get("departmentid"));
        String jobtitle=Util.null2String(param.get("jobtitle"));
        String lastname=Util.null2String(param.get("lastname"));
        String mobile=Util.null2String(param.get("mobile"));
        String cus_certnum=Util.null2String(param.get("cus_certnum"));
        String type=Util.null2String(param.get("type"));
        if(!departmentid.equals("")&&!jobtitle.equals("")&&!lastname.equals("")&&!mobile.equals("")&&type.equals("simple")){
            RecordSet rs=new RecordSet();
            String upd="update hrmresource set certificatenum='"+cus_certnum+"' where lastname='"+lastname+"' and jobtitle='"+jobtitle+"' and mobile='"+mobile+"' and  departmentid='"+departmentid+"'";
            obj.put("upd", upd);
            rs.execute(upd);
        }

        return obj.toString();
    }


    public static void main(String[] args) {
        /*
       JSONObject obj= JSONObject.fromObject("{\"minpasslen\":1,\"condition\":[{\"title\":\"基本信息\",\"defaultshow\":true,\"items\":[{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"workcode\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"编号\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"lastname\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"姓名\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"otherParams\":{\"inputType\":\"multilang\",\"isBase64\":true},\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":3},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"SELECT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"sex\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"key\":\"\",\"label\":\"性别\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"options\":[{\"disabled\":false,\"key\":\"0\",\"selected\":true,\"showname\":\"男\",\"visible\":true},{\"disabled\":false,\"key\":\"1\",\"selected\":false,\"showname\":\"女\",\"visible\":true}],\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"SELECT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"accounttype\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"key\":\"\",\"label\":\"账号类型\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"options\":[{\"disabled\":false,\"key\":\"0\",\"selected\":true,\"showname\":\"主账号\",\"visible\":true},{\"disabled\":false,\"key\":\"1\",\"selected\":false,\"showname\":\"次账号\",\"visible\":true}],\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2},{\"belong\":\"PC\",\"browserConditionParam\":{\"asynLoadAll\":false,\"checkStrictly\":true,\"completeParams\":{\"sqlwhere\":\"(accounttype=0 or accounttype=null or accounttype is null)\"},\"conditionDataParams\":{},\"dataParams\":{\"sqlwhere\":\"(accounttype=0 or accounttype=null or accounttype is null)\"},\"defaultCheckStrictly\":true,\"defaultExpandedLevel\":1,\"destDataParams\":{\"sqlwhere\":\"(accounttype=0 or accounttype=null or accounttype is null)\"},\"expandfirstnode\":false,\"handleTypes\":\"\",\"hasAddBtn\":false,\"hasAdvanceSerach\":true,\"hasBorder\":false,\"hasTabConditions\":false,\"hideAdvanceSearch\":false,\"hideVirtualOrg\":false,\"icon\":\"icon-coms-hrm\",\"iconBgcolor\":\"#217346\",\"idSeparator\":\",\",\"isAutoComplete\":1,\"isDetail\":0,\"isMultCheckbox\":false,\"isSingle\":true,\"linkUrl\":\"/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/\",\"mobileLinkUrl\":\"/spa/hrm/static4mobile/index.html#/resourceInfo/~~~itemKeyHolder~~~\",\"noOperate\":true,\"otherParams\":{},\"pageSize\":10,\"quickSearchName\":\"\",\"replaceDatas\":[],\"replaceNotCtrl\":false,\"scrollx\":false,\"searchParams\":{},\"searchPlaceholder\":\"\",\"showCheckStrictly\":true,\"tabs\":[{\"isSearch\":false,\"key\":\"1\",\"name\":\"最近\",\"selected\":false,\"showOrder\":0},{\"isSearch\":false,\"key\":\"2\",\"name\":\"同部门\",\"selected\":false,\"showOrder\":0},{\"isSearch\":false,\"key\":\"3\",\"name\":\"我的下属\",\"selected\":false,\"showOrder\":0},{\"isSearch\":false,\"key\":\"4\",\"name\":\"组织结构\",\"selected\":false,\"showOrder\":0},{\"isSearch\":false,\"key\":\"5\",\"name\":\"常用组\",\"selected\":false,\"showOrder\":0},{\"isSearch\":false,\"key\":\"6\",\"name\":\"所有人\",\"selected\":false,\"showOrder\":0}],\"title\":\"人力资源\",\"type\":\"1\",\"viewAttr\":3},\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"BROWSER\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"belongto\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"主账号\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":3},{\"belong\":\"PC\",\"browserConditionParam\":{\"asynLoadAll\":false,\"checkStrictly\":true,\"completeParams\":{\"rightStr\":\"HrmResourceAdd:Add\"},\"conditionDataParams\":{},\"dataParams\":{\"rightStr\":\"HrmResourceAdd:Add\"},\"defaultCheckStrictly\":true,\"defaultExpandedLevel\":1,\"destDataParams\":{},\"expandfirstnode\":false,\"handleTypes\":\"\",\"hasAddBtn\":false,\"hasAdvanceSerach\":true,\"hasBorder\":false,\"hasTabConditions\":false,\"hideAdvanceSearch\":false,\"hideVirtualOrg\":false,\"icon\":\"icon-coms-hrm\",\"iconBgcolor\":\"#217346\",\"idSeparator\":\",\",\"isAutoComplete\":1,\"isDetail\":0,\"isMultCheckbox\":false,\"isSingle\":true,\"linkUrl\":\"/spa/hrm/engine.html#/hrmengine/organization?showTree=false&type=department&id=\",\"mobileLinkUrl\":\"\",\"noOperate\":true,\"otherParams\":{},\"pageSize\":10,\"quickSearchName\":\"\",\"replaceDatas\":[],\"replaceNotCtrl\":false,\"scrollx\":false,\"searchParams\":{},\"searchPlaceholder\":\"\",\"showCheckStrictly\":true,\"tabs\":[{\"isSearch\":false,\"key\":\"2\",\"name\":\"组织结构\",\"selected\":false,\"showOrder\":0},{\"dataParams\":{\"list\":\"1\"},\"isSearch\":true,\"key\":\"1\",\"name\":\"按列表\",\"selected\":false,\"showOrder\":0}],\"title\":\"分权单部门\",\"type\":\"167\",\"viewAttr\":3},\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"BROWSER\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"departmentid\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"部门\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":3},{\"belong\":\"PC\",\"browserConditionParam\":{\"asynLoadAll\":false,\"checkStrictly\":true,\"completeParams\":{},\"conditionDataParams\":{},\"dataParams\":{},\"defaultCheckStrictly\":true,\"defaultExpandedLevel\":0,\"destDataParams\":{},\"expandfirstnode\":false,\"handleTypes\":\"\",\"hasAddBtn\":false,\"hasAdvanceSerach\":true,\"hasBorder\":false,\"hasTabConditions\":false,\"hideAdvanceSearch\":false,\"hideVirtualOrg\":false,\"icon\":\"icon-coms-hrm\",\"iconBgcolor\":\"#217346\",\"idSeparator\":\",\",\"isAutoComplete\":1,\"isDetail\":0,\"isMultCheckbox\":false,\"isSingle\":true,\"linkUrl\":\"/spa/hrm/engine.html#/hrmengine/posts?id=\",\"mobileLinkUrl\":\"\",\"noOperate\":true,\"otherParams\":{},\"pageSize\":10,\"quickSearchName\":\"\",\"replaceDatas\":[],\"replaceNotCtrl\":false,\"scrollx\":false,\"searchParams\":{},\"searchPlaceholder\":\"\",\"showCheckStrictly\":true,\"title\":\"岗位\",\"type\":\"24\",\"viewAttr\":3},\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"BROWSER\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"jobtitle\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"岗位\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":3},{\"belong\":\"PC\",\"browserConditionParam\":{\"asynLoadAll\":false,\"checkStrictly\":true,\"completeParams\":{},\"conditionDataParams\":{},\"dataParams\":{},\"defaultCheckStrictly\":true,\"defaultExpandedLevel\":1,\"destDataParams\":{},\"expandfirstnode\":false,\"handleTypes\":\"\",\"hasAddBtn\":false,\"hasAdvanceSerach\":true,\"hasBorder\":false,\"hasTabConditions\":false,\"hideAdvanceSearch\":false,\"hideVirtualOrg\":false,\"icon\":\"icon-coms-hrm\",\"iconBgcolor\":\"#217346\",\"idSeparator\":\",\",\"isAutoComplete\":1,\"isDetail\":0,\"isMultCheckbox\":false,\"isSingle\":true,\"linkUrl\":\"/spa/hrm/index_mobx.html#/main/hrm/card/cardInfo/\",\"mobileLinkUrl\":\"/spa/hrm/static4mobile/index.html#/resourceInfo/~~~itemKeyHolder~~~\",\"noOperate\":true,\"otherParams\":{},\"pageSize\":10,\"quickSearchName\":\"\",\"replaceDatas\":[],\"replaceNotCtrl\":false,\"scrollx\":false,\"searchParams\":{},\"searchPlaceholder\":\"\",\"showCheckStrictly\":true,\"tabs\":[{\"isSearch\":false,\"key\":\"1\",\"name\":\"最近\",\"selected\":false,\"showOrder\":0},{\"isSearch\":false,\"key\":\"2\",\"name\":\"同部门\",\"selected\":false,\"showOrder\":0},{\"isSearch\":false,\"key\":\"3\",\"name\":\"我的下属\",\"selected\":false,\"showOrder\":0},{\"isSearch\":false,\"key\":\"4\",\"name\":\"组织结构\",\"selected\":false,\"showOrder\":0},{\"isSearch\":false,\"key\":\"5\",\"name\":\"常用组\",\"selected\":false,\"showOrder\":0},{\"isSearch\":false,\"key\":\"6\",\"name\":\"所有人\",\"selected\":false,\"showOrder\":0}],\"title\":\"人力资源\",\"type\":\"1\",\"viewAttr\":2},\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"BROWSER\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"managerid\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"直接上级\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"SELECT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"status\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"key\":\"\",\"label\":\"状态\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"options\":[{\"disabled\":false,\"key\":\"0\",\"selected\":true,\"showname\":\"试用\",\"visible\":true},{\"disabled\":false,\"key\":\"1\",\"selected\":false,\"showname\":\"正式\",\"visible\":true},{\"disabled\":false,\"key\":\"2\",\"selected\":false,\"showname\":\"临时\",\"visible\":true}],\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":3},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"RESOURCEIMG\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"resourceimageid\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"照片\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2},{\"belong\":\"PC\",\"browserConditionParam\":{\"asynLoadAll\":false,\"checkStrictly\":true,\"completeParams\":{},\"conditionDataParams\":{},\"dataParams\":{},\"defaultCheckStrictly\":true,\"defaultExpandedLevel\":0,\"destDataParams\":{},\"expandfirstnode\":false,\"handleTypes\":\"\",\"hasAddBtn\":false,\"hasAdvanceSerach\":true,\"hasBorder\":false,\"hasTabConditions\":false,\"hideAdvanceSearch\":false,\"hideVirtualOrg\":false,\"idSeparator\":\",\",\"isAutoComplete\":1,\"isDetail\":0,\"isMultCheckbox\":false,\"isSingle\":true,\"linkUrl\":\"/spa/hrm/engine.html#/hrmengine/officeLocation?id=\",\"mobileLinkUrl\":\"\",\"noOperate\":true,\"otherParams\":{},\"pageSize\":10,\"quickSearchName\":\"\",\"replaceDatas\":[],\"replaceNotCtrl\":false,\"scrollx\":false,\"searchParams\":{},\"searchPlaceholder\":\"\",\"showCheckStrictly\":true,\"title\":\"办公地点\",\"type\":\"262\",\"viewAttr\":3},\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"BROWSER\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"locationid\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"办公地点\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":3}]},{\"title\":\"通讯信息\",\"defaultshow\":true,\"items\":[{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"mobile\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"移动电话\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"telephone\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"办公室电话\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"email\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"电子邮件\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2}]},{\"title\":\"工作信息\",\"defaultshow\":true,\"items\":[{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"DATEPICKER\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"companystartdate\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"入职日期\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":3},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"DATEPICKER\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"workstartdate\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"参加工作日期\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":3}]},{\"title\":\"系统信息\",\"defaultshow\":true,\"items\":[{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"loginid\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"登录名\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"password\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"密码\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"otherParams\":{\"tip\":\"\",\"tipLength\":\"100\",\"type\":\"password\"},\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"password1\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"确认密码\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"otherParams\":{\"type\":\"password\"},\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUTNUMBER\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"seclevel\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"安全级别\",\"labelcol\":6,\"length\":0,\"max\":\"999\",\"maxFilesNumber\":0,\"maxUploadSize\":0,\"min\":\"-999\",\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":2},{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"validatecode\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"验证码\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"precision\":0,\"rules\":\"required|string\",\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":3}]}],\"openRSA\":\"1\",\"hasJobTitlesAdd\":true,\"passwordComplexity\":\"0\",\"customDesc\":\"ProxyHrmResourceAddService 20220228 lth\"}\n");

        JSONArray his=obj.getJSONArray("condition").getJSONObject(0).getJSONArray("items");
        JSONArray newArr=new JSONArray();
        for (int i = 0; i <his.size() ; i++) {
            if(i==1){
                JSONObject certnum=JSONObject.fromObject("{\"belong\":\"PC\",\"checkbox\":false,\"checkboxValue\":false,\"colSpan\":2,\"conditionType\":\"INPUT\",\"dateGroup\":false,\"defaultDisplayInBar\":false,\"detailtype\":1,\"domkey\":[\"cus_certnum\"],\"entSearch\":false,\"fieldcol\":12,\"hasBorder\":false,\"helpfulTipProps\":{},\"hide\":false,\"isBase64\":false,\"isQuickSearch\":false,\"label\":\"身份证号码\",\"labelcol\":6,\"length\":0,\"maxFilesNumber\":0,\"maxUploadSize\":0,\"multiSelection\":false,\"multiple\":false,\"otherParams\":{\"inputType\":\"multilang\",\"isBase64\":true},\"precision\":0,\"secretLimit\":false,\"showOrder\":0,\"showTime\":false,\"stringLength\":0,\"supportCancel\":false,\"tipPosition\":\"bottom\",\"valueList\":[],\"viewAttr\":3}");
                newArr.add(certnum);
            }
            newArr.add(his.getJSONObject(i));
        }

       System.out.println(obj.getJSONArray("condition").getJSONObject(0).getJSONArray("items").getJSONObject(0).getString("label"));
        */

    }


}
